import request from '@/utils/request'

// 已收的消息
export function listReceive(data) {
  return request({
    url: '/sys/sysMessages/receiveMessages',
    method: 'post',
    params: data
  })
}

// 改变消息阅读状态
export function changeStatus(data) {
  return request({
    url: '/sys/sysMessages/changeStatus',
    method: 'post',
    params: data
  })
}

// 全部标记为已读
export function changeAllStatus(status) {
  var data = {
    status: status
  }
  return request({
    url: '/sys/sysMessages/changeAllStatus',
    method: 'post',
    params: data
  })
}

// 消息提醒
export function getMessage(id) {
  return request({
    url: '/sys/sysMessages/sentMessages',
    method: 'post',
    params: { id }
  })
}
